/*
 * @Author: your name
 * @Date: 2022-01-06 16:40:49
 * @LastEditTime: 2022-04-02 11:39:40
 * @LastEditors: your name
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \web\src\index.jsx
 */
import React, { Component } from "react";
import ReactDOM from "react-dom";
import { BrowserRouter as Router, Routes, Route } from "react-router-dom";
import Login from "./router/login";
import AdminUserPage from "./router/adminUserPage";
import ClassPage from "./router/class";
import CoursePage from "./router/course";
import AdminList from "./router/adminUserPage/adminChild/adminList";
import AdminEdit from "./router/adminUserPage/adminChild/adminEdit";
import StudentList from "./router/adminUserPage/adminChild/studentList";
import StudentCreate from "./router/adminUserPage/adminChild/studentCreate";
import TeacherList from "./router/adminUserPage/adminChild/teacherList";
import TeacherCreate from "./router/adminUserPage/adminChild/teacherCreate";
import Course from './router/class/classChild/course';
import UserInfo from './router/class/classChild/userInfo';
import Homework from './router/course/courseChild/homework';
import JobSettings from './router/course/courseChild/jobSettings';
import LearningRecords from './router/course/courseChild/learningRecords';
import Overview from './router/course/courseChild/overview';
import "./assets/css/base.css";
export class Index extends Component {
  render() {
    return (
      <Router>
        <Routes>
          <Route exact path="/" element={<Login />}></Route>
          <Route path="/login" element={<Login />}></Route>
          <Route path="/adminUserPage" element={<AdminUserPage />}>
            <Route index element={<AdminList />}></Route>
            <Route path="adminList" element={<AdminList />}></Route>
            <Route path="adminEdit" element={<AdminEdit />}></Route>
            <Route path="studentList" element={<StudentList />}></Route>
            <Route path="studentCreate" element={<StudentCreate />}></Route>
            <Route path="teacherList" element={<TeacherList />}></Route>
            <Route path="teacherCreate" element={<TeacherCreate />}></Route>
          </Route>
          <Route path="/classPage" element={<ClassPage />}>
            <Route index element={<Course />}></Route>
            <Route path="course" element={<Course />}></Route>
            <Route path="userInfo" element={<UserInfo />}></Route>
          </Route>
          <Route path="/coursePage/:id" element={<CoursePage />}>
            <Route path="homework" element={<Homework />}></Route>
            <Route path="jobSettings" element={<JobSettings />}></Route>
            <Route path="learningRecords" element={<LearningRecords />}></Route>
            <Route path="overview" element={<Overview />}></Route>
          </Route>
        </Routes>
      </Router>
    );
  }
}
ReactDOM.render(<Index />, document.getElementById("root"));
